<?php
use  yii\helpers\Url;
use  yii\helpers\Html;
$menu    = \backend\modules\models\setting\Menu::findOne(['name'=>'经营管理']);
$content = $menu->getAllContents(6);
$main    = \backend\modules\models\setting\Menu::findOne(['name'=>'经营管理','parent_id'=>0]);
?>
<div class="col-md-4 news-panel-wrap">
    <div class="row news-panel">
        <div class="col-md-12">
            <div class="model-title">
                <div>经营管理</div>
                <div class="en-name">Management</div>
                <div class="line-wrap"><img src="assets/title-img.png" alt="">
                    <div class="title-line"></div>
                </div>
                <a href="<?= Url::to(['site/menu','menu_id'=>$main?$main->id:0])?>" class="a-more">更多<i class="iconfont icon-double-arrow"></i></a>
            </div>
        </div>
        <div class="container-fluid news-wrap">
            <ul class="list-unstyled">
                <?php if ($content) {?>
                    <?php foreach ($content as $one => $first): ?>
                        <li class="new-item">
                            <div><img src="assets/item-img.png" alt=""><a href="<?= Url::to(['site/content','content_id'=>$first->id])?>"><?= Html::encode($first->title)?></a></div>
                            <div><?= Html::encode(date('Y-m-d',strtotime($first->create_time)))?></div>
                        </li>
                    <?php endforeach ?>
                <?php }?>
            </ul>
        </div>
    </div>
</div>